//
//  DHHomeButton.m
//  宏达APP
//
//  Created by DIANGHONG on 2018/4/27.
//  Copyright © 2018年 123. All rights reserved.
//

#import "DHHomeButton.h"
@interface DHHomeButton()
@property (weak, nonatomic) IBOutlet UIImageView *image;
@property (weak, nonatomic) IBOutlet UILabel *title;

@end
@implementation DHHomeButton

+ (instancetype)buttonWithImageName:(NSString *)imageName title:(NSString *)title{
    
    UINib *nib = [UINib nibWithNibName:@"DHHomeButton" bundle:nil];
    
    DHHomeButton *btn = (DHHomeButton *)[nib instantiateWithOwner:nil options:nil][0];
    
    btn.image.image = [UIImage imageNamed:imageName];
    btn.title.text = title;
    
    return btn;
}

@end
